#include "timer.h"
#include "reg52.h"
#include "beep.h"
uint_16 timer_ms =0;
void Timer0_Init(void)		
{
	TMOD = 0x01;
	TL0 = 0x20;				
	TH0 = 0xD1;				
	TF0 = 0;				
	TR0 = 1;			
	ET0 = 1;
	EA=1;
}

void Timer0_Isr(void) interrupt 1
{
	timer_ms++;
	if(timer_ms == BEEP_FLAG)
	{
		BEEP = ~BEEP;
		timer_ms = 0;
	}
//	LED0 = ~LED0;
	
}